#pragma once

#include "NetTypes.h"
#include "Channel.h"
#include <vector>

namespace phynet{
namespace net{

class Connection
{
public:
	Connection();
	~Connection();

	//TODO: safe against copy

	const Address& GetAddr() const;
	
	Channel& GetChannel(const size_t i_index)
	{
		return *m_channels[i_index];
	}

private:
	Channels m_channels;
	Address m_addr;
};

typedef std::vector<Connection> Connections;

}} //namespaces